home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / ien / ien-12 < prev    next >
Text File  |  1988-12-01  |  70KB  |  1,952 lines

  1.  
  2.                                                LLG 8-Jun-77 13:01  29364
  3.      
  4. IEN # 12                                            L. Garlick / SRI-ARC
  5. Supercedes: None                                        R. Rom / SRI-ARC
  6. Replaces: None                                        J. Postel /SRI-ARC
  7.                                                            15 March 1977
  8.  
  9. Section: 2.4.4.1
  10.  
  11.  
  12.  
  13.  
  14.                Issues in Reliable Host-to-Host Protocols
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.                           Lawrence L. Garlick
  22.                               Raphael Rom
  23.                            Jonathan B. Postel
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.                              March 15, 1977
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.                       Augmentation Research Center
  50.                       Stanford Research Institute
  51.                      Menlo Park, California  94025
  52.                                     
  53.                              (415) 326-6200
  54.  
  55.                                                LLG 8-Jun-77 13:01  29364
  56.      Issues in Reliable Host-to-Host Protocols
  57.  
  58.  
  59.  
  60.                                 ABSTRACT
  61.  
  62.        Fully reliable network host-to-host protocols have recently
  63.        gained significant attention, primarily due to more strin-
  64.        gent security requirements of network users.  This paper
  65.        will discuss issues related to one such protocol, which is
  66.        supported by the Transmission Control Program (TCP).  The
  67.        protocol, first introduced in 1974, features end-to-end pos-
  68.        itive acknowledgement, retransmission, internetwork
  69.        addressing capabilities, and ordered delivery.
  70.  
  71.        The issues of interest in this paper are protocol correct-
  72.        ness and completeness, protocol efficiency, and complexity
  73.        of implementation.  The discussion will suggest alterations
  74.        and extensions to TCP.
  75.  
  76.        Flow control heuristics using TCP's windowing techniques are
  77.        explored.  Flow control information is augmented to allow
  78.        fair apportionment of bandwidth, better bandwidth utiliza-
  79.        tion through optimistic credits, flow control credits
  80.        matched to the type of traffic, and increased performance
  81.        for high precedence connections.
  82.  
  83.        An alternative for selecting the startup sequence number of
  84.        a connection is presented.  It is suggested that the
  85.        resynchronization method for sequence number space manage-
  86.        ment should be abandoned because it is overly complicated
  87.        and can actually fail when the data stream is stopped by
  88.        flow control.
  89.  
  90.        The need for the separation of data and control channels is
  91.        motivated, introducing the notion of a reliable subchannel.
  92.  
  93.        The findings are presented both to further the understanding
  94.        of reliable protocols and to encourage intelligent
  95.        implementations of TCP.
  96.  
  97.                                                LLG 8-Jun-77 13:01  29364
  98.      Issues in Reliable Host-to-Host Protocols
  99.  
  100.  
  101.  
  102.                Issues in Reliable Host-to-Host Protocols
  103.                                     
  104.                                                                        2
  105.  
  106.      INTRODUCTION                                                      3
  107.  
  108.        Due to numerous advances in computer communications, there
  109.        has been a tremendous growth in computer networking.  This
  110.        has led to the need for parallel advances in distributed
  111.        computing protocols.  Typical of these advances are the
  112.        packet switching network protocols developed for the ARPA
  113.        network.  The need for a protocol that supports distributed
  114.        process-to-process communication was realized early by ARPA
  115.        network designers and the ARPA host-to-host protocol (AHHP)
  116.        became the reference point for such process-to-process
  117.        protocols.                                                     3a
  118.  
  119.        The AHHP has been very successful in providing a basis for
  120.        abundant research in distributed computing and in providing
  121.        a prototype for process-to-process protocols.  As experience
  122.        with networking has grown, new applications, new topologies,
  123.        new network access methods, and new higher level protocols
  124.        have emerged.  The AHHP has not been entirely suited for the
  125.        new requirements that have resulted from this experience.      3b
  126.  
  127.        End-to-end reliability is an example of a new requirement
  128.        needed by host-to-host protocols.  It has been a concern for
  129.        builders of both secure applications and higher level
  130.        protocols.  There are two important motivations for strin-
  131.        gent reliability requirements.  First, security measures,
  132.        such as encryption, are often applied at the host-to-host
  133.        level or lower.  Second, higher level protocols, such as the
  134.        ARPA TELNET protocol, should not be required to handle
  135.        transmission error checking.  The AHHP does not provide
  136.        host-to-host acknowledgement; it relies upon subnet and
  137.        host-to-subnet protocols to deliver messages reliably.
  138.        While the performance of the AHHP has been almost error
  139.        free, it has been known to lose messages; thus it cannot be
  140.        considered a fully reliable protocol.                          3c
  141.  
  142.        Other deficiencies in AHHP include addressing constraints,
  143.        weak error recovery, simplex connections, and large overhead
  144.        for passing flow control information.                          3d
  145.  
  146.        TCP, which, throughout this paper will be an abbreviation
  147.        for both the Transmission Control Program and the protocol
  148.        it supports, corrects the deficiencies of AHHP.  TCP was
  149.  
  150.  
  151.  
  152.  
  153.      Garlick, Rom, & Postel                                       page 1
  154.  
  155.                                                LLG 8-Jun-77 13:01  29364
  156.      Issues in Reliable Host-to-Host Protocols
  157.  
  158.  
  159.  
  160.        initially designed to be a reliable internetwork host-to-
  161.        host protocol [Reference 1], as well as a solution to many
  162.        of the problems of the AHHP.  When the special internetwork
  163.        addressing considerations are ignored (as they shall be in
  164.        this paper), it represents a significant advancement in
  165.        host-to-host protocols.  Among its reliability features are
  166.        positive acknowledgement, retransmission, and sequencing of
  167.        data and controls.  It guarantees the error free delivery of
  168.        each message for which it claims successful delivery.  Other
  169.        improvements include duplex connections and the ability to
  170.        use a network address (socket) in several connections.         3e
  171.  
  172.        The paper is organized around three issues--a discussion of
  173.        flow control techniques for TCP, alternate strategies for
  174.        the management of connection sequence number space, and the
  175.        need for a control subchannel for each TCP connection.  To
  176.        provide further context for the discussion, a brief summary
  177.        of interesting TCP features is presented.  It is assumed
  178.        that the reader is somewhat familiar with the AHHP and has
  179.        been exposed to the early literature on TCP-like protocols
  180.        [References 1, 2, 6].  A glossary of abbreviations and
  181.        terms, and appendices that magnify a few of the more in-
  182.        volved issues can be found at the end of the paper.            3f
  183.  
  184.  
  185.  
  186.      TCP:  A RELIABLE TRANSMISSION PROTOCOL                            4
  187.  
  188.        Network Characteristics                                        4a
  189.  
  190.          TCP does not depend on the transmission medium for its re-
  191.          liability, i.e., it is assumed that the subnetwork may be
  192.          unreliable.  The subnet need not ensure the orderly or
  193.          errorless delivery of subnet packets, or account for lost
  194.          packets.  TCP functions correctly in the face of large
  195.          packet lifetimes, and the opening and closing of
  196.          connections in quick succession.
  197.  
  198.        Connections                                                    4b
  199.  
  200.          Logical connections are established for process-to-process
  201.          (user-to-user) communication.  TCP connections are full-
  202.          duplex channels established between source and destination
  203.          sockets (network-wide process names).  A socket may be a
  204.          party to more than one connection, but only one connection
  205.          can exist between any pair of sockets.
  206.  
  207.  
  208.  
  209.  
  210.  
  211.      Garlick, Rom, & Postel                                       page 2
  212.  
  213.                                                LLG 8-Jun-77 13:01  29364
  214.      Issues in Reliable Host-to-Host Protocols
  215.  
  216.  
  217.  
  218.          TCP provides the means by which a connection between the
  219.          processes is established, controlled during the transfer
  220.          of data, and terminated at the completion of the session.
  221.          Connection management requires the exchange of controls
  222.          between TCP's.  There are controls for connection
  223.          synchronization, out-of-band signalling (interrupt), data
  224.          flushing, resynchronization, and connection closing.  As
  225.          described below, controls accompany data whenever possible
  226.          to avoid the overhead of separate control packets.
  227.  
  228.        Packaging and Headers                                          4c
  229.  
  230.          TCP packages user letters (messages) into packets suitable
  231.          for transmission over a subnetwork.  Each letter or par-
  232.          tial letter is prefixed by a TCP header, which includes
  233.          fields for addressing, sequencing, acknowledgements, flow
  234.          control, controls, and error checking.  The header is
  235.          optionally followed by a block of data.  The smallest unit
  236.          of data transfer and the unit of sequencing is the 8-bit
  237.          byte (octet).
  238.  
  239.        Sequencing                                                     4d
  240.  
  241.          Sequence numbers are used as acknowledgement identifiers
  242.          and as an ordering mechanism.  They are assigned to each
  243.          octet of data and to those controls that need
  244.          synchronization with the data stream.  Only one sequence
  245.          number is sent with each TCP header; it represents the se-
  246.          quence number assigned to the first control or data in the
  247.          packet.  This means that data and control sequence numbers
  248.          come from the same name space.  The packet length is used
  249.          to determine the highest sequence number consumed by the
  250.          packet.
  251.  
  252.          Reuse of sequence numbers is allowed only for duplicate
  253.          retransmissions.  The sequence number space is managed by
  254.          a cooperatively by the sender and the receiver, as will be
  255.          discussed later.
  256.  
  257.        Acknowledgement and Retransmission                             4e
  258.  
  259.          A TCP acknowledgement represents the successful delivery
  260.          of some number of octets to the receiving process's buffer
  261.          or to the remote TCP (controls).  It is sent to the
  262.          transmitting TCP in the acknowledgement field of a subse-
  263.          quent TCP header.  The sequence number placed in this
  264.          field is the highest sequence number acknowledged by the
  265.  
  266.  
  267.  
  268.  
  269.      Garlick, Rom, & Postel                                       page 3
  270.  
  271.                                                LLG 8-Jun-77 13:01  29364
  272.      Issues in Reliable Host-to-Host Protocols
  273.  
  274.  
  275.  
  276.          receiver and implies acknowledgement of all previous
  277.          octets.  If packets arrive out of order, an
  278.          acknowledgement cannot be sent for octets with sequence
  279.          numbers higher than the missing octets, since that would
  280.          implicitly acknowledge the missing data.
  281.  
  282.          Packets can be retransmitted at will until they are
  283.          acknowledged; however, bandwidth may be underutilized if
  284.          improper retransmission policies are followed.  Duplicates
  285.          naturally arise from retransmissions that occur prior to
  286.          the receipt of an acknowledgment and are detected and han-
  287.          dled as described below.
  288.  
  289.        Synchronization and Resynchronization                          4f
  290.  
  291.          TCP is expected to run in a network with relatively long
  292.          packet lifetimes and relatively short times between the
  293.          closing and opening of a connection.  Therefore, several
  294.          problems must be solved concerning detection of old dupli-
  295.          cate packets, that is, packets that have sequence numbers
  296.          assigned by old instances of a connection between the same
  297.          sockets.  These problems are how to select startup se-
  298.          quence numbers, how to reliably exchange new sequence num-
  299.          bers, and how to determine when resynchronization of se-
  300.          quence numbers is necessary.
  301.  
  302.          The exchange of sequence numbers at synchronization or
  303.          resynchronization time is accomplished using a "three-way
  304.          handshake" method [References 2, 4, 5].  This method pro-
  305.          vides positive acknowledgement of the exchanged sequence
  306.          numbers and is sufficient to handle the problem of
  307.          simultaneous connection establishment attempts.
  308.  
  309.          A solution to the other two problems has been an Initial
  310.          Sequence Number curve [References 4, 5, 6], that is used
  311.          by the sender as a mechanism for 1) selecting the first
  312.          sequence number for a connection and 2) detecting when the
  313.          consumption of sequence numbers is not progressing in a
  314.          manner that will guarantee that old duplicates can be
  315.          reliably identified by the receiving TCP.
  316.  
  317.          The management of the sequence number space will be dis-
  318.          cussed in section 4.
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.      Garlick, Rom, & Postel                                       page 4
  328.  
  329.                                                LLG 8-Jun-77 13:01  29364
  330.      Issues in Reliable Host-to-Host Protocols
  331.  
  332.  
  333.  
  334.        Flow Control                                                   4g
  335.  
  336.          Flow control is exerted by the receiver by issuing
  337.          credits, which represent the receiving process's
  338.          willingness to buffer data.  Credits are passed in the TCP
  339.          header in the window size field.  The window size is added
  340.          to the last acknowledged sequence number (the window's
  341.          left edge) to give the highest allowable sequence number
  342.          that may be sent (the window's right edge).  Flow control
  343.          is discussed in further detail in section 3.
  344.  
  345.        Packet Acceptance Checking                                     4h
  346.  
  347.          The receiving TCP is responsible for the detection of
  348.          packets with improper sequence numbers.  These may have
  349.          sequence numbers that are either old duplicates (from pre-
  350.          vious connections) or illegal because they are not within
  351.          an acceptable flow control range.
  352.  
  353.          To determine the action to be taken for a newly received
  354.          packet, acceptability ranges are defined.  The following
  355.          three ranges are mutually exclusive and collectively
  356.          exhaustive of the sequence number space (see Figure 1):
  357.  
  358.            Acknowledge-deliver range (ADR)
  359.  
  360.              The packet has arrived in-order and does not exceed
  361.              the receiving process's buffer space.  Data will be
  362.              placed in the buffer and an acknowledgement will be
  363.              generated to indicate successful delivery.
  364.  
  365.            Acknowledge-only range (AOR)
  366.  
  367.              A duplicate packet has arrived, as a result of
  368.              retransmission.  It will be acknowledged, but not de-
  369.              livered, since delivery has already occurred.
  370.  
  371.            Discard range (DR)
  372.  
  373.              An illegal packet has arrived.  It may be an old du-
  374.              plicate or a packet that cannot be delivered due to
  375.              flow control.
  376.  
  377.          Appendix A provides more details of the packet acceptance
  378.          policy.
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.      Garlick, Rom, & Postel                                       page 5
  386.  
  387.                                                LLG 8-Jun-77 13:01  29364
  388.      Issues in Reliable Host-to-Host Protocols
  389.  
  390.  
  391.  
  392.          
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.          
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.      Garlick, Rom, & Postel                                       page 6
  444.  
  445.                                                LLG 8-Jun-77 13:01  29364
  446.      Issues in Reliable Host-to-Host Protocols
  447.  
  448.  
  449.  
  450.  
  451.  
  452.      FLOW CONTROL TECHNIQUES                                           5
  453.  
  454.        Flow control is basically a mechanism to prevent the re-
  455.        ceiving process's buffers from overflowing.  A good flow
  456.        control scheme must handle a whole spectrum of problems that
  457.        result from performing this basic duty.  This section first
  458.        discusses general flow control goals and methods, and then
  459.        specific techniques for use with TCP that could significa-
  460.        ntly improve protocol performance.  Where suggestions occur,
  461.        they represent an enhancement to the flow control scheme
  462.        used in the initial versions of TCP.                           5a
  463.  
  464.        The goals of an ambitious flow control scheme include the
  465.        following:                                                     5b
  466.  
  467.          Receiver's Allocation
  468.  
  469.            Any flow control strategy should consider the buffer
  470.            space offered by a receiving user, since this represents
  471.            a depository for incoming messages and relieves the TCP
  472.            of resource allocation problems.
  473.  
  474.          Congestion Prevention
  475.  
  476.            The flow control strategy should prevent queueing of
  477.            messages in the protocol module (TCP), so that TCP re-
  478.            sources can be used to handle those messages that have a
  479.            high probability of being delivered immediately.
  480.            Congestion in the subnet can be caused by a
  481.            retransmission protocol like TCP, since each
  482.            unacknowledged packet is retransmitted.  The flow con-
  483.            trol scheme should make it easy to slow or stop
  484.            retransmission from the sender.
  485.  
  486.          Deadlock Prevention
  487.  
  488.            When congestion does occur, resources must be available
  489.            to handle traffic-clearing messages.  Controls and flow
  490.            control information must be delivered and interpreted
  491.            even when data is queued.
  492.  
  493.          Fair Apportionment Of Bandwidth
  494.  
  495.            In a virtual connection environment, it is important to
  496.            be able to fairly allocate the available bandwidth to
  497.  
  498.  
  499.  
  500.  
  501.      Garlick, Rom, & Postel                                       page 7
  502.  
  503.                                                LLG 8-Jun-77 13:01  29364
  504.      Issues in Reliable Host-to-Host Protocols
  505.  
  506.  
  507.  
  508.            users, based on a variety of criteria.  One criterion
  509.            may be precedence of the user or the connection.  Anoth-
  510.            er may be the mode of traffic, e.g., interactive traffic
  511.            may get preference over bulk traffic.
  512.  
  513.          Bandwidth Utilization For Various Modes Of Transmission
  514.  
  515.            A network will usually serve several types of user
  516.            communities and thus should be able to adapt the flow
  517.            control strategy to the needs of the user.  For example,
  518.            transmission patterns for interactive users and bulk
  519.            transfer users are quite different.  Those differences
  520.            should be reflected in the flow control strategies.
  521.  
  522.          Interplay With Subnet Flow Control
  523.  
  524.            Often the interfaces between modules representing levels
  525.            of protocol can cause flow control problems [Reference
  526.            8].  For instance, the subnet flow control of the
  527.            ARPANET is adversely affected whenever a host does not
  528.            readily accept incoming data from the packet switch
  529.            (IMP).  TCP is especially flexible in this regard, be-
  530.            cause it can absorb congested traffic from the subnet
  531.            and discard it if necessary.
  532.  
  533.        Exchanging Flow Control Information                            5c
  534.  
  535.          A windowing scheme to convey flow control information has
  536.          been used for many different types of protocols.  It is an
  537.          efficient technique that is useful whenever positive
  538.          acknowledgement and retransmission are used for reliable
  539.          transmission.  Flow control information is passed in the
  540.          header of a packet as a window size.  It is used in con-
  541.          junction with the acknowledgement sequence number (the
  542.          window's left edge) to determine the highest sequence num-
  543.          ber that can be transmitted with some assurance that it
  544.          will be acknowledged without retransmission.  The
  545.          acknowledge sequence number plus the window size gives the
  546.          right edge of the flow control window.
  547.  
  548.          A nonzero window size gives permission to send a message
  549.          of a certain length.  It is an "oversend" to send messages
  550.          with sequence numbers that exceed the window right edge.
  551.          In TCP, oversends will occur occasionally, since the flow
  552.          control information is always slightly out of date and it
  553.          is possible to withdraw flow control credits.  Occassional
  554.          oversends are not a problem, because the receiver can al-
  555.  
  556.  
  557.  
  558.  
  559.      Garlick, Rom, & Postel                                       page 8
  560.  
  561.                                                LLG 8-Jun-77 13:01  29364
  562.      Issues in Reliable Host-to-Host Protocols
  563.  
  564.  
  565.  
  566.          ways discard incoming data without sending
  567.          acknowledgements.
  568.  
  569.        Determining the Window Size                                    5d
  570.  
  571.          The TCP acknowledgement and retransmission scheme allows
  572.          flexibility in determining the correct flow control window
  573.          size.  The window size should indicate the willingness of
  574.          the receiving process to provide buffer space.  The window
  575.          size could represent exactly the available buffer space
  576.          that the user has offered for letter receiving (the
  577.          conservative strategy), or it could reflect some expected
  578.          buffer space, based on previous allocations (the
  579.          optimistic strategy).
  580.  
  581.          Conservative Guaranteed Allocation
  582.  
  583.            The conservative approach to window size setting gives
  584.            the receiving process almost full control over the flow
  585.            control mechanism.  By assuring the sender that there
  586.            will be space for a particular number of octets, the
  587.            policy reduces discards thus reducing the number of
  588.            retransmissions.  (Some messages may still be discarded
  589.            if they arrive out of order and sufficient reassembly
  590.            space is not available.)
  591.  
  592.            There are some disadvantages to the conservative
  593.            strategy of window size setting.  Flow control informa-
  594.            tion is always slightly out of date when it is finally
  595.            received.  The receiving process could have drastically
  596.            increased or decreased its allocation, making the infor-
  597.            mation useless.  Unless a process provides for double
  598.            buffering, the window very likely will go from a fixed
  599.            size (whatever the users buffer is) to zero, each time a
  600.            message is passed on to the receiving process.  Depend-
  601.            ing on the scheduling algorithm in the host, this could
  602.            result in windows of size zero, totally inhibiting mes-
  603.            sage flow.  Before messages can flow again, a packet
  604.            with flow control information must arrive at the source.
  605.            Thus, a round trip delay is experienced between messages
  606.            and there is an increase of dataless packets in the net-
  607.            work.
  608.  
  609.            Another related problem is that large single buffers may
  610.            be used to receive small letters.  If a window of say
  611.            size k is advertised and a packet of size << k arrives
  612.            that includes the end of a letter, then the destination
  613.  
  614.  
  615.  
  616.  
  617.      Garlick, Rom, & Postel                                       page 9
  618.  
  619.                                                LLG 8-Jun-77 13:01  29364
  620.      Issues in Reliable Host-to-Host Protocols
  621.  
  622.  
  623.  
  624.            buffer is returned to the receiving process.  The previ-
  625.            ous flow control credit, which was large, is withdrawn
  626.            and the window becomes zero.  In the interim, the sender
  627.            may have sent several small letters, thinking the
  628.            receiver has the buffers to accept them.  The receiving
  629.            TCP, knowing that the receiving process has no available
  630.            buffer space, will advertise a zero window.  By the time
  631.            the window information arrives at the sending TCP, it
  632.            likely will be an inaccurate report and cause further
  633.            delays.
  634.  
  635.          Optimistic Credits
  636.  
  637.            The alternative to the conservative approach is to send
  638.            flow control information that is a good estimate of the
  639.            expected receiver's available space [References 3,7].
  640.            Thus, the window size should be a function of previous
  641.            window sizes as well as the current available space.
  642.            The window size should be an average, weighted very
  643.            heavily toward the current time, so that a process that
  644.            is truly rejecting data will soon reflect a very small
  645.            window.
  646.  
  647.            This method could even be mixed with heuristics to force
  648.            the window to zero after a fixed period without re-
  649.            ceiving.
  650.  
  651.            Optimistic allocation can do much to help solve the
  652.            problem of drastic window size changes experienced with
  653.            the conservative scheme.  In granting permission to
  654.            transmit messages before the user has allocated buffer
  655.            space, it fills the pipe and allows a smoother flow.  It
  656.            is still reliable, because any message can be discarded
  657.            in the receiver since it will be retransmitted later.
  658.  
  659.            The disadvantages of the method are its instability when
  660.            faced with very irregular receiving patterns.  A poorly
  661.            behaving receiver can still sabotage this policy, but
  662.            not as easily as with conservative technique.  As will
  663.            be shown below, an optimistic strategy may be quite
  664.            dynamic with respect to recent receiving patterns,
  665.            connection precedence, and the fair sharing of the
  666.            available bandwidth.
  667.  
  668.            It may be possible to determine the semantics associated
  669.            with the window size by exchanging transmission mode or
  670.            topological information.  When a connection is opened,
  671.  
  672.  
  673.  
  674.  
  675.      Garlick, Rom, & Postel                                      page 10
  676.  
  677.                                                LLG 8-Jun-77 13:01  29364
  678.      Issues in Reliable Host-to-Host Protocols
  679.  
  680.  
  681.  
  682.            the transmission mode (e.g., interactive, bulk) and the
  683.            topology (e.g., satellite link) could be exchanged.
  684.            This would be used to determine the weighting of previ-
  685.            ous window sizes in calculating the current window.
  686.  
  687.            To demonstrate the idea of an optimistic flow control
  688.            policy, a method for setting the receive window size is
  689.            given in Appendix B.
  690.  
  691.        Zero Flow Control Windows                                      5e
  692.  
  693.          It may be necessary to stop the flow on a TCP connection,
  694.          i.e., stop all new transmissions and unnecessary
  695.          retransmissions.  This is required when there are no user
  696.          receive buffers into which data can be placed.  A zero re-
  697.          ceive window indicates an unwillingless to receive data.
  698.          This reluctance is conveyed to the remote TCP by sending a
  699.          packet with zero in the window size field.
  700.  
  701.          When interpreting packets, each TCP must read window sizes
  702.          on all packets, even those that acknowledge old
  703.          duplicates.  This is necessary for setting the window to
  704.          zero when there is no data to carry the flow control in-
  705.          formation.
  706.  
  707.          TCP must perform special functions with regard to sending
  708.          packets into a zero window.  If no data is being sent on
  709.          the connection, a zero window is of no concern to the
  710.          sending TCP.  If there is data to be sent, it must be
  711.          queued.  If necessary, new data from the sending process
  712.          must be rejected.  The creation of new packets must be
  713.          suspended entirely, and retransmission must be suspended,
  714.          except for flushing controls, synchronizing controls, and
  715.          the window opening control mentioned below.
  716.  
  717.          Opening a window of size zero also presents some special
  718.          problems [Reference 6].  Since a window size can accompany
  719.          each packet, it seems that the normal data packet and
  720.          acknowledgement transmissions should be sufficient to vary
  721.          the size of the windows.  However, when the remote TCP is
  722.          showing a zero receive window, it is difficult to send a
  723.          window change reliably.  A data packet cannot be sent be-
  724.          cause the closed window indicates that only controls
  725.          should be retransmitted; moreover, there may be no data to
  726.          send.  If ACKs are used and they arrive out of order, it
  727.          may be impossible to tell if the window is opening or
  728.          closing.
  729.  
  730.  
  731.  
  732.  
  733.      Garlick, Rom, & Postel                                      page 11
  734.  
  735.                                                LLG 8-Jun-77 13:01  29364
  736.      Issues in Reliable Host-to-Host Protocols
  737.  
  738.  
  739.  
  740.          The problem of opening a window of size zero is solved by
  741.          using a pair of controls, one sent by the local TCP that
  742.          is making its window size nonzero (WOPEN) and one that is
  743.          sent by the foreign TCP to acknowledge the opening (WACK).
  744.          These are special controls that must be handled immediate-
  745.          ly, without regard for flow control restrictions.  If con-
  746.          trols can be blocked by data, as in the present TCP, then
  747.          the WOPEN must be tagged with, but must not consume a se-
  748.          quence number.
  749.  
  750.  
  751.  
  752.      SEQUENCE NUMBER SPACE MANAGEMENT                                  6
  753.  
  754.        The second area of the current TCP protocol that needs at-
  755.        tention is that of the reliable handling of the sequence
  756.        number space.  In a packet-switching network with
  757.        alternative routing schemes, a packet can have a relatively
  758.        long lifetime, especially if the topology of the network in-
  759.        cludes satellite links.  Due to misrouting, a packet can ar-
  760.        rive at its destination minutes or even hours late, depend-
  761.        ing on the topology.  A reliable protocol must be able to
  762.        determine if such a packet is deliverable, acknowledgeable,
  763.        or if it must be discarded without acknowledgement.  If dur-
  764.        ing the packet's transit time the connection is closed or
  765.        broken due to a crash with loss of memory, then the packet
  766.        is no longer valid.  If the connection is reestablished,
  767.        using the same source and destination addresses, then the
  768.        arrival of the old packet can cause confusion in the re-
  769.        ceiving TCP.  A reliable mechanism must exist to guarantee
  770.        that the receiving TCP can distinguish packets of the cur-
  771.        rent connection from packets of an old connection.             6a
  772.  
  773.        Resynchronization, suggested by Tomlinson [Reference 4,5],
  774.        is one such mechanism.  Resynchronization is used in this
  775.        paper to denote the mechanism itself, rather than the stage
  776.        of the mechanism when the actual resetting of the sequence
  777.        numbers is done.  The scheme is based on selecting initial
  778.        sequence numbers (ISN's) from a curve in the sequence-
  779.        number/time plane.  When a new connection is opened, its
  780.        first sequence number is taken from the ISN curve.  If the
  781.        consumption of sequence numbers is satisfactory, i.e., simi-
  782.        lar in slope to the ISN curve, resynchronization of sequence
  783.        numbers need not occur.  However, if the rate of consumption
  784.        is too slow, resynchronization may be required to avoid
  785.        colliding with the ISN curve.  The ISN curve has a parallel
  786.        boundary (defining a "forbidden zone") that indicates that
  787.  
  788.  
  789.  
  790.  
  791.      Garlick, Rom, & Postel                                      page 12
  792.  
  793.                                                LLG 8-Jun-77 13:01  29364
  794.      Issues in Reliable Host-to-Host Protocols
  795.  
  796.  
  797.  
  798.        no new sequence numbers may be assigned and that
  799.        resynchronization must take place immediately.  If this is
  800.        not done and if a crash occurs, sequence numbers assigned in
  801.        the forbidden zone could conflict with the ISN chosen for
  802.        the new connection.  See Appendix C, and References 4, 5, 6
  803.        for further details of the resynchronization mechanism.        6b
  804.  
  805.        A few of the problems related to implementing
  806.        resynchronization are discussed below.                         6c
  807.  
  808.          Understanding and Documenting the Problem
  809.  
  810.            Even though the resynchronization method is a workable
  811.            one, it is not at all straightforward.  It takes
  812.            numerous pages and illustrations just to document the
  813.            concept [Reference 4,5,6].  As has been pointed out in
  814.            the past by weathered ARPANET protocol implementers, a
  815.            protocol must be reasonably easy to understand and easy
  816.            to document.  After all, if the network is
  817.            heterogeneous, it will be implemented on numerous kinds
  818.            of hardware by system programmers with various degrees
  819.            of skill.
  820.  
  821.          Testing for the Need to Resynchronize
  822.  
  823.            The protocol requires that if a connection is broken due
  824.            to a system crash, the sequence number chosen at startup
  825.            must be one that cannot be confused with any sequence
  826.            number still in the network for the old instance of that
  827.            connection.  To satisfy this requirement, periodic
  828.            runtime checking must be done to determine if the se-
  829.            quence number consumption rate is satisfactory, i.e., if
  830.            it is approaching the forbidden zone.  This check must
  831.            be done at fixed time intervals, not just when sequence
  832.            numbers are being assigned.  The check may result in the
  833.            need to resynchronize even (and especially) if the
  834.            connection is idle.
  835.  
  836.          Resynchronization and Flow Control
  837.  
  838.            The need to resynchronize may occur at any time, and the
  839.            resynchronization must proceed in a timely manner if
  840.            normal activity is to continue.  However, since
  841.            resynchronization means changing from the old sequence
  842.            numbers to new sequence numbers and since the
  843.            resynchronization control must be acknowledged (marked
  844.            with an "old" sequence number), all data marked with the
  845.  
  846.  
  847.  
  848.  
  849.      Garlick, Rom, & Postel                                      page 13
  850.  
  851.                                                LLG 8-Jun-77 13:01  29364
  852.      Issues in Reliable Host-to-Host Protocols
  853.  
  854.  
  855.  
  856.            "old" numbers must be acknowledged before the
  857.            resynchronization control is acknowledged.  If data is
  858.            not being accepted because the user is not receiving,
  859.            then resynchronization cannot proceed.  If
  860.            resynchronization cannot proceed, then neither new con-
  861.            trols nor new data may be sent.
  862.  
  863.          The Loss of a Truly Out-Of-Band Signal
  864.  
  865.            Due to the flow control problem mentioned above, all
  866.            controls can be blocked during a resynchronization pro-
  867.            cess.  This includes the interrupt, which is supposed to
  868.            be an out-of-band signal.  Losing the out-of-band capa-
  869.            bility, even in rare instances, is an unfortunate defi-
  870.            ciency.  Higher-level protocols that rely on an out-of-
  871.            band signal could be severely crippled by the inability
  872.            to interrupt a "runaway" process.  In fact, it is the
  873.            runaway process, by not accepting data, that will soon
  874.            force resynchronization and will not be interruptable.
  875.  
  876.          Extra Connection States and Controls
  877.  
  878.            When a state diagram is used to represent a TCP
  879.            connection, 40% of the connection states are a result of
  880.            the resynchronization mechanism [Reference 6].  These
  881.            seven extra states allow for simultaneous
  882.            resynchronization attempts and resynchronization
  883.            attempts during connection closing (with no data loss).
  884.  
  885.            One extra control is required to support
  886.            resynchronization.  It is believed that more would be
  887.            required for satisfactory solutions to the problems of
  888.            resynchronizing a connection that is blocked by data
  889.            flow control and for support of a true out-of-band sig-
  890.            nal.
  891.  
  892.          Decentralized Code
  893.  
  894.            Code to support resynchronization would be scattered
  895.            throughout many modules of the protocol implementation.
  896.            There must be a watchdog for detecting the forbidden
  897.            zone.  There would be heuristics strewn throughout the
  898.            control sending and parsing modules.  Also, to solve the
  899.            flow control and interrupt problems mentioned above,
  900.            special provisions must be made for either flushing data
  901.            or saving old sequence numbers.
  902.  
  903.  
  904.  
  905.  
  906.  
  907.      Garlick, Rom, & Postel                                      page 14
  908.  
  909.                                                LLG 8-Jun-77 13:01  29364
  910.      Issues in Reliable Host-to-Host Protocols
  911.  
  912.  
  913.  
  914.        An Alternative to Resynchronization                            6d
  915.  
  916.          An alternative to resynchronization is a strategy that
  917.          uniquely names each instance of a connection.  The name
  918.          (or incarnation number) is passed in each packet and is
  919.          used by the receiver to filter out packets from old
  920.          connections.  The incarnation number is generated from
  921.          clock time; thus, like the resynchronization method, no
  922.          crash-proof memory is required.
  923.  
  924.          Each time a TCP comes up, it determines its incarnation
  925.          number from a clock.  The appropriate clock resolution and
  926.          wraparound period is a factor of the maximum packet
  927.          lifetime for the network or interconnected network.  Let
  928.          us assume that the clock has a resolution of one minute
  929.          and a wraparound period of 256 minutes.  The resulting
  930.          incarnation number is 8 bits long, and is used to assure
  931.          the receiver that any message received with this
  932.          incarnation number is from the active connection and not
  933.          an old one.  The uniqueness of the incarnation number al-
  934.          lows the resetting of the sequence number space to zero at
  935.          initialization of each new path (first connection between
  936.          two users).
  937.  
  938.          When a connection is closed, a TCP must save the last se-
  939.          quence number used.  It must retain the number for time
  940.          MPL (maximum packet lifetime).  Saving the sequence number
  941.          and the time of a closed connection solves the problem of
  942.          the repeated opening and closing of the same connection
  943.          (source and destination).  It does not solve the problems
  944.          created by TCP or host computer crashes.
  945.  
  946.          When connection establishment is requested, the list of
  947.          old connections must be searched by (source, destination).
  948.          If a match is found, the sequence number plus one is the
  949.          first sequence number used when the connection is opened.
  950.          If there is no match, then numbering can start at zero.
  951.          Management of the old connection list entails removal of
  952.          outdated items.  This can be handled, for the most part,
  953.          during normal searching.  When list storage becomes
  954.          scarce, a simple garbage collection routine can be
  955.          invoked.
  956.  
  957.          There are two problems with the method using incarnation
  958.          numbers.  First, there is some concern about the size of
  959.          the old connection list.  It would not be surprising to
  960.          see 1000 connections per hour for an average host.  The
  961.  
  962.  
  963.  
  964.  
  965.      Garlick, Rom, & Postel                                      page 15
  966.  
  967.                                                LLG 8-Jun-77 13:01  29364
  968.      Issues in Reliable Host-to-Host Protocols
  969.  
  970.  
  971.  
  972.          fact that TCP allows a socket to be party to many
  973.          connections will lead to fewer source and destination
  974.          pairs; thus, many connections will be reused.  (This is in
  975.          contrast to the ARPA network, where restrictions in socket
  976.          usage result in contact connections being used to spawn
  977.          direct, dynamically named service connections.)  Another
  978.          factor that alleviates concern about the space required
  979.          for the old connection list is the recent progress in
  980.          inexpensive memories.
  981.  
  982.          The second problem is how to keep the incarnation number
  983.          small enough to be sent in each header and still keep the
  984.          clock cycle (name space) large enough to ensure
  985.          uniqueness.  It is felt that an incarnation number field
  986.          greater than 8 bits is excessive header overhead.  To ac-
  987.          commodate this, the resolution of the clock is
  988.          constrained, which leads to the following restriction ap-
  989.          plied at host startup time.  When a host comes up after a
  990.          crash, it must delay at least MPL / 2**8 before any
  991.          connections are opened, so that a unique TCP incarnation
  992.          number is always chosen.  A startup delay of one minute is
  993.          probably sufficient for the internetting case since it
  994.          implies a maximum packet lifetime (MPL) of 256 minutes.
  995.  
  996.  
  997.  
  998.      THE NEED FOR A CONTROL SUBCHANNEL                                 7
  999.  
  1000.        In earlier versions of TCP, data, controls, and out-of-band
  1001.        signals (also a control) are all multiplexed onto one
  1002.        logical channel.  This means that one set of sequence num-
  1003.        bers is used for their orderly and reliable delivery.          7a
  1004.  
  1005.        One advantage of a single logical channel is the savings in
  1006.        the TCP header.  Protocol overhead is a serious matter,
  1007.        since it is suffered with each message.  Let us assume that
  1008.        it is desirable to allow piggybacking of activity from each
  1009.        channels.  Since each logical channel requires header fields
  1010.        for both a sequence number and an acknowledgement number,
  1011.        header sizes increase by twice the sequence number field
  1012.        size as each new channel is added.                             7b
  1013.  
  1014.        A second advantage to one logical channel is the ability to
  1015.        synchronize the control stream with the data stream.
  1016.        Synchronization of the control and data streams is useful
  1017.        for handling interrupts and connection closing (without data
  1018.        loss).  However, synchronization of streams can result in
  1019.  
  1020.  
  1021.  
  1022.  
  1023.      Garlick, Rom, & Postel                                      page 16
  1024.  
  1025.                                                LLG 8-Jun-77 13:01  29364
  1026.      Issues in Reliable Host-to-Host Protocols
  1027.  
  1028.  
  1029.  
  1030.        unwanted interdependencies, since the acknowledgement of a
  1031.        control may require the acknowledgement of preceding data.     7c
  1032.  
  1033.        Two disadvantages of the single sequence number space scheme
  1034.        have been discovered recently:  reassembly of data mixed
  1035.        with controls is costly when packets arrive out of order,
  1036.        and a true out-of-band signal is not being provided.  The
  1037.        first problem is an efficiency matter that has plagued early
  1038.        implementers [Reference 9].  User buffer space cannot be
  1039.        used for the reassembly of out of order packets because
  1040.        there is no way to know if the unarrived packets contain
  1041.        only data or if controls are intermixed with the data.         7d
  1042.  
  1043.        The essence of the second problem is that the
  1044.        acknowledgement scheme requires that acknowledgement of a
  1045.        sequence number is implicit acknowledgement of all preceding
  1046.        sequence numbers.  Since interrupts must be acknowledged for
  1047.        reliability, the transmission of an interrupt can be blocked
  1048.        by data flow control in the receiver.  This was noticed by
  1049.        Cerf initially (Reference 2) and an attempt was made to
  1050.        rectify the matter by giving the interrupt extra semantics--
  1051.        that it always flushes unacknowledged data.  This solution
  1052.        is probably sufficient unless resynchronization methods are
  1053.        used for sequence number selection.                            7e
  1054.  
  1055.        As mentioned earlier, when the resynchronization method is
  1056.        used, there is no clean solution to the problem of achieving
  1057.        both synchronization with the data stream and independence
  1058.        of data flow control.  This is due to the fact that the
  1059.        resynchronizing control can be blocked by data flow control
  1060.        but cannot be flushed.                                         7f
  1061.  
  1062.        A compromise solution when using resynchronization is to
  1063.        separate controls and interrupts from the data channel, mak-
  1064.        ing a control subchannel.  The control sequence number is
  1065.        the composite of the data channel sequence number (DCSN) and
  1066.        the subchannel sequence number (SCSN).  This serves the dual
  1067.        purpose of synchronizing the two streams and using the
  1068.        resynchronization mechanism of the data channel for all
  1069.        subchannels.  A subchannel allows reliable transmission even
  1070.        when the data channel is inactive, without flushing data.      7g
  1071.  
  1072.        From the SCSN, the number of control fields, and the last
  1073.        SCSN received, the receiver can determine if subchannel
  1074.        traffic is coming in order and thus, whether it can be
  1075.        acknowledged.                                                  7h
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.      Garlick, Rom, & Postel                                      page 17
  1082.  
  1083.                                                LLG 8-Jun-77 13:01  29364
  1084.      Issues in Reliable Host-to-Host Protocols
  1085.  
  1086.  
  1087.  
  1088.        The field size holding the SCSN determines the wraparound
  1089.        point in the SCSN space.  The SCSN space is initialized to
  1090.        zero when the DCSN is synchronized.  It IS NOT reset with
  1091.        each DCSN change.                                              7i
  1092.  
  1093.        There is no flow control information passed for the
  1094.        subchannel.  Discarding controls (without acknowledgement)
  1095.        is the flow control mechanism.  Since the sequence number
  1096.        space is small compared to that needed to prevent wraparound
  1097.        in the worst case, the TCP must keep track of the DCSN to
  1098.        which the first SCSN was assigned.  If wraparound of the
  1099.        SCSN space occurs, in the rare event that many controls are
  1100.        sent while the data channel is blocked, then the control
  1101.        channel becomes blocked.  This is very unlikely because a
  1102.        long series of controls will probably contain a string of
  1103.        interrupts, and successfully delivered interrupts will usu-
  1104.        ally cause the receiving process to unblock the data chan-
  1105.        nel.                                                           7j
  1106.  
  1107.        Acceptability Test for Subchannel Traffic                      7k
  1108.  
  1109.          The acceptability test of items on the subchannel is a
  1110.          composite test of both sequence numbers.  First the DCSN
  1111.          is checked to see if it would be acknowledged if it were
  1112.          an octet received on the data channel.  Only if it would
  1113.          have been discarded will the item on the subchannel be
  1114.          discarded.  Having passed the DCSN test, the SCSN is
  1115.          checked to see if the item is deliverable and
  1116.          acknowledgeable with respect to the SCSN sequence number
  1117.          space.  The SCSN test is less involved than the DCSN test
  1118.          because there is no flow control range.  To be believable,
  1119.          the SCSN must fall in the range of SCSN's sent and SCSN's
  1120.          for which acknowledgements have been received.  This is a
  1121.          check for everything except the existence of old
  1122.          duplicates from old instances of the connection, which is
  1123.          made by checking the DCSN.
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.      Garlick, Rom, & Postel                                      page 18
  1140.  
  1141.                                                LLG 8-Jun-77 13:01  29364
  1142.      Issues in Reliable Host-to-Host Protocols
  1143.  
  1144.  
  1145.  
  1146.        A Scenario Using a Control Subchannel                          7l
  1147.  
  1148.          Let us examine a short scenario between TCP A and TCP B.
  1149.          The scenario assumes connections have been established and
  1150.          transmission has proceeded normally.  Only those header
  1151.          fields that relate to data and control channels will be
  1152.          indicated.  Note that the control length can be determined
  1153.          by the receiver from other fields in the header.  The fol-
  1154.          lowing shorthand will be used in the scenario:
  1155.  
  1156.            DSN - data sequence number
  1157.            DL - length of data in octets
  1158.            DACK - acknowledgement for all preceding data octets
  1159.            CSN - control sequence number
  1160.            CACK - acknowledgement for all preceding controls
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.      Garlick, Rom, & Postel                                      page 19
  1198.  
  1199.                                                LLG 8-Jun-77 13:01  29364
  1200.      Issues in Reliable Host-to-Host Protocols
  1201.  
  1202.  
  1203.  
  1204.          #1 from TCP A
  1205.        -----------------------------------
  1206.        !  DSN ! DL ! DACK ! CSN ! CACK  ! ====>
  1207.        !  100 !  2 !  200 !   5 !   25  ! ====>
  1208.        -----------------------------------
  1209.          sends 2 data octets (100 & 101),
  1210.           acks data through 200;
  1211.          sends 1 control (5), acks controls
  1212.           through 25.
  1213.          
  1214.          #2 from TCP A
  1215.        -----------------------------------
  1216.        !  DSN ! DL ! DACK ! CSN ! CACK  ! ====>
  1217.        !  102 !  3 !  200 !   5 !   25  ! ====>
  1218.        -----------------------------------
  1219.          sends 3 data octets (102-104),
  1220.           acks data through 200;
  1221.          sends no controls,
  1222.           acks controls through 25.
  1223.          
  1224.          #3 from TCP A
  1225.        -----------------------------------
  1226.        !  DSN ! DL ! DACK ! CSN ! CACK  ! ====>
  1227.        !  105 !  3 !  201 !   6 !   25  ! ====>
  1228.        -----------------------------------
  1229.          sends 3 data octets (105-107),
  1230.           acks data through 201;
  1231.          sends 1 control (6),
  1232.           acks controls through 25.
  1233.          
  1234.                                   #4 from TCP B
  1235.                                ----------------------------------
  1236.                          <==== !  DSN ! DL ! DACK ! CSN ! CACK  !
  1237.                          <==== !  202 !  1 !  101 !  26 !    6  !
  1238.                                ----------------------------------
  1239.                               Having received #1, #3, but not #2,
  1240.                                 sends 1 data octets (202),
  1241.                                   acks data through 101;
  1242.                                 sends 1 control (26),
  1243.                                  acks controls through 6.
  1244.          
  1245.  
  1246.        The main things to notice from this scenario are that data
  1247.        and controls are still piggybacked, as in the current
  1248.        version of TCP, and that there is a degree of independence
  1249.        between the two channels.  As the scenario shows, TCP B can
  1250.        acknowledge controls that have arrived in order even though
  1251.  
  1252.  
  1253.  
  1254.  
  1255.      Garlick, Rom, & Postel                                      page 20
  1256.  
  1257.                                                LLG 8-Jun-77 13:01  29364
  1258.      Issues in Reliable Host-to-Host Protocols
  1259.  
  1260.  
  1261.  
  1262.        it has not received data in order.  Moreover, TCP B is able
  1263.        to use the latest data sequence number to test the accep-
  1264.        tability of the latest control sequence numbers.
  1265.  
  1266.  
  1267.  
  1268.      SUMMARY                                                           8
  1269.  
  1270.        Several suggestions have been presented here for the im-
  1271.        provement of TCP.  The suggestions relate to improved effi-
  1272.        ciency, simplification of implementation, and protocol
  1273.        functionality.  The motivation for the suggestions is more
  1274.        than to improve a specific protocol.  It is also to focus
  1275.        attention on a set of issues that are common to all reliable
  1276.        host-to-host protocols.                                        8a
  1277.  
  1278.        Flow control ideas have been discussed, with attention to
  1279.        implementation ideas that satisfy fairly ambitious goals.
  1280.        Window management techniques have been suggested that could
  1281.        improve efficiency.  A window setting method was presented
  1282.        that features optimistic credits that are a function of past
  1283.        credits, congestion, and available buffer space.               8b
  1284.  
  1285.        An alternative to the resynchronization method of sequence
  1286.        number space management has been given.  The suggested meth-
  1287.        od is based on passing TCP incarnation numbers and keeping
  1288.        an old connection list.  The method is simple to implement,
  1289.        requires no nonvolatile memory, and still guarantees reli-
  1290.        able detection of illegal packets.                             8c
  1291.  
  1292.        Finally, the need for the separation of data and control
  1293.        channels was motivated.  The solution, a reliable
  1294.        subchannel, is achievable with no separate sequence number
  1295.        space maintenance.                                             8d
  1296.  
  1297.        It is hoped that each of these suggestions will be imple-
  1298.        mented in future versions of TCP.  There are
  1299.        interdependencies involved; that is, some of the stated
  1300.        problems become less severe when others are solved.  For ex-
  1301.        ample, if resynchronization is abandoned, then the argument
  1302.        for separate channels is motivated only by the need for the
  1303.        efficient reassembly of out of order packets.                  8e
  1304.  
  1305.        Of all the suggestions, the most important is that concern-
  1306.        ing a new approach to sequence number space management.
  1307.        However, if resynchronization methods are retained, then a
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.      Garlick, Rom, & Postel                                      page 21
  1314.  
  1315.                                                LLG 8-Jun-77 13:01  29364
  1316.      Issues in Reliable Host-to-Host Protocols
  1317.  
  1318.  
  1319.  
  1320.        subchannel for controls is a must.  Otherwise, a truly out-
  1321.        of-band signal is lost.                                        8f
  1322.  
  1323.        The discussion of flow control indicated areas that should
  1324.        gain attention as more experience with TCP is gained.  This
  1325.        should be an area for significant measurement, under many
  1326.        different transmission modes.
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.      Garlick, Rom, & Postel                                      page 22
  1372.  
  1373.                                                LLG 8-Jun-77 13:01  29364
  1374.      Issues in Reliable Host-to-Host Protocols
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.      REFERENCES
  1381.  
  1382.        [1]     Cerf, V. and R. Kahn, "A Protocol for Packet Network
  1383.                Intercommunication," IEEE Transactions on Communica-
  1384.                tion, Vol COM-20, No. 5, May 1974.
  1385.  
  1386.        [2]     Cerf, V., Y. Dalal, C. Sunshine, "Specification of
  1387.                Internet Transmission Control Program," INWG General
  1388.                Note #72, December 1974 (Revised).
  1389.  
  1390.        [3]     Sunshine, C., "Interprocess Communication Protocols
  1391.                for Computer Networks," Digital Systems Laboratory
  1392.                Technical Note #105, December 1975.
  1393.  
  1394.        [4]     Tomlinson, R., "Selecting Sequence Numbers," INWG
  1395.                Protocol Note #2, September 1974.
  1396.  
  1397.        [5]     Dalal, Y., "More on Selecting Sequence Numbers,"
  1398.                INWG Protocol Note #4, October 1974.
  1399.  
  1400.        [6]     Postel, J., L. Garlick, R. Rom, "Transmission Con-
  1401.                trol Protocol Specification (AUTODIN II)," SRI-ARC
  1402.                Catalog #35938 & #35939, July 1976.
  1403.  
  1404.        [7]     Sunshine, C., "Factors In Interprocess Communication
  1405.                Protocol Efficiency For Computer Networks," Proc.
  1406.                National Computer Conf., 1976, AFIPS Press, pp
  1407.                571-576.
  1408.  
  1409.        [8]     Herrmann, Jeff, "Flow Control in the ARPA Network,"
  1410.                Networks, Vol 1, Number 1, June 1976.
  1411.  
  1412.        [9]     Burchfiel, J., W. Plummer, R. Tomlinson, "Proposed
  1413.                Revisions to the TCP," INWG Protocol Note #44, Sep-
  1414.                tember 1976.
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.      Garlick, Rom, & Postel                                      page 23
  1430.  
  1431.                                                LLG 8-Jun-77 13:01  29364
  1432.      Issues in Reliable Host-to-Host Protocols
  1433.  
  1434.  
  1435.  
  1436.      GLOSSARY
  1437.  
  1438.        AHHP:  ARPANET host-to-host protocol.
  1439.  
  1440.        control:  commands passed between TCP's that are used to co-
  1441.        ordinate connection management.
  1442.  
  1443.        DCSN:  data channel sequence number.
  1444.  
  1445.        host:  a computer that is connected to the network and that
  1446.        executes programs on behalf of its users.  A host may pro-
  1447.        vide services to other computers on the network.
  1448.  
  1449.        ISN:  Initial sequence number; the first sequence number
  1450.        used when a connection is synchronized or resynchronized.
  1451.  
  1452.        MPL:  maximum packet lifetime.
  1453.  
  1454.        octet:  eight bits.
  1455.  
  1456.        SCSN:  subchannel sequence number; control channel sequence
  1457.        number.
  1458.  
  1459.        socket:  an entity defining one end of a TCP connection; the
  1460.        inter-network-wide name of a process port.
  1461.  
  1462.        subnetwork:  the network of computers that provides a com-
  1463.        munication medium for network hosts.  The nodes of a
  1464.        subnetwork may function as host interface points as well as
  1465.        store and forward computers.
  1466.  
  1467.        TCP:  Transmisssion Control Program and the protocol it
  1468.        implements.
  1469.  
  1470.        window:  a dynamic range in the sequence number space used
  1471.        in flow control management.
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.      Garlick, Rom, & Postel                                      page 24
  1488.  
  1489.                                                LLG 8-Jun-77 13:01  29364
  1490.      Issues in Reliable Host-to-Host Protocols
  1491.  
  1492.  
  1493.  
  1494.      APPENDIX A:  PACKET ACCEPTANCE
  1495.  
  1496.        This appendix provides details of the TCP packet acceptance
  1497.        testing scheme.  It should clarify the possible actions the
  1498.        receiving TCP may take when it receives an arbitrary packet.
  1499.        Remember, the receiver is responsible for the detection of
  1500.        packets with improper sequence numbers from either old
  1501.        connections or ill-behaving TCP's.  For notation, let
  1502.  
  1503.          ADR = acknowledge and deliver range
  1504.  
  1505.          AOR = acknowledge only range
  1506.  
  1507.          DR = discard range
  1508.  
  1509.          S = size of sequence number space (number per octet)
  1510.  
  1511.          x = sequence number to be tested
  1512.  
  1513.          FCLE = flow control left window edge
  1514.  
  1515.          ADRE = (FCLE+ADR) mod S = Ack-deliver right edge (Discard
  1516.                   left edge - 1)
  1517.  
  1518.          AOLE = (FCLE-AOR) mod S =  Ack-only left edge (Discard
  1519.                   right edge + 1)
  1520.  
  1521.          TSE = time since connection establishment (in sec)
  1522.  
  1523.          MPL = maximum packet lifetime (in sec)
  1524.  
  1525.          TB = TCP bandwidth (in octets/sec)
  1526.  
  1527.        For any sequence number, x, and packet text length, l, if
  1528.  
  1529.          (AOLE <= x <= ADRE) mod S  and
  1530.  
  1531.          (AOLE <= x+l-1 <= ADRE) mod S
  1532.  
  1533.        then the packet should be acknowledged.
  1534.  
  1535.        If x and l satisfy
  1536.  
  1537.          (FCLE <= x <= ADRE) mod S  and
  1538.  
  1539.          (FCLE <= x+l-1 <= ADRE) mod S
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.      Garlick, Rom, & Postel                                      page 25
  1546.  
  1547.                                                LLG 8-Jun-77 13:01  29364
  1548.      Issues in Reliable Host-to-Host Protocols
  1549.  
  1550.  
  1551.  
  1552.        then x can also be delivered to the user; however, ordered
  1553.        delivery requires that x = FCLE.
  1554.  
  1555.        A packet is not in a range only if all of it lies outside a
  1556.        range.  When a packet falls in more than one range, prece-
  1557.        dence is ADR, then AOR, then DR.  When a packet falls in the
  1558.        AOR then an ACK should be sent, even if a packet has to be
  1559.        created.  The ACK will specify the current left window edge.
  1560.        This assures acknowledgment of all duplicates.
  1561.  
  1562.        ADRE is exactly the maximum sequence number ever
  1563.        "advertised" through the flow control window, plus one.
  1564.        This allows for controls to be accepted even though
  1565.        permission for them may never have been explicitly given.
  1566.        Of course, each time a control with a sequence number equal
  1567.        to the ADRE is sent, the ADRE must be incremented by one.
  1568.  
  1569.        AOR is set so that old duplicates (from previous
  1570.        incarnations of the connection) can be detected and dis-
  1571.        carded.  Thus
  1572.  
  1573.          AOR = Min(TSE, MPL) * TB.
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.      Garlick, Rom, & Postel                                      page 26
  1604.  
  1605.                                                LLG 8-Jun-77 13:01  29364
  1606.      Issues in Reliable Host-to-Host Protocols
  1607.  
  1608.  
  1609.  
  1610.      APPENDIX B:  WINDOW SIZE SETTING
  1611.  
  1612.        To demonstrate the idea of an optimistic policy for window
  1613.        size setting, a method for setting the receive window size
  1614.        is given [Reference 6].  The scheme satisfies the flow con-
  1615.        trol goals discussed earlier.  Several parameters have been
  1616.        vaguely unspecified since they can be determined only after
  1617.        considerable testing and measurement of a specific TCP im-
  1618.        plementation.
  1619.  
  1620.        First, some notation:
  1621.  
  1622.          B - Total bandwidth of the TCP, given unlimited user re-
  1623.          sources
  1624.  
  1625.          N - The number of connections in the TCP
  1626.  
  1627.          CONGEST - A congestion factor which reflects available TCP
  1628.          resources (CONGEST =< 1)
  1629.  
  1630.          WLT - The long term window
  1631.  
  1632.          W - The current window
  1633.  
  1634.          AVWT - Weighting coefficient for available buffer space
  1635.  
  1636.          OLDWT - Weighting coefficient for old window (OLDWT = 1 -
  1637.          AVWT)
  1638.  
  1639.          Tot - Total user buffer space
  1640.  
  1641.          Avail - The unfilled part of Tot
  1642.  
  1643.        The long term window might look like:
  1644.  
  1645.          WLT = B/N * CONGEST.
  1646.  
  1647.        The algorithm used to update the current window is the fol-
  1648.        lowing. Upon the processing of a user's receive request
  1649.        (buffer offering), the local receive window is set so that:
  1650.  
  1651.          W = MINIMUM(WLT, Tot).
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.  
  1658.  
  1659.  
  1660.  
  1661.      Garlick, Rom, & Postel                                      page 27
  1662.  
  1663.                                                LLG 8-Jun-77 13:01  29364
  1664.      Issues in Reliable Host-to-Host Protocols
  1665.  
  1666.  
  1667.  
  1668.        Each time a packet is sent for this connection, the local
  1669.        TCP sets the receive window and the packet header window
  1670.        size field so that
  1671.  
  1672.          W = (AVWT * Avail/Tot) * WLT + (OLDWT * W)   (for nonzero
  1673.          Tot)
  1674.  
  1675.          and
  1676.  
  1677.          W = OLDWT * W                   (for Tot = 0).
  1678.  
  1679.        It is important to note that a user's receive buffer is re-
  1680.        turned when an End-of-Letter is received.  Thus, a small
  1681.        letter sent to a large buffer can cause the Avail and Tot to
  1682.        vary abruptly, even though there may be a smooth flow of
  1683.        letters.
  1684.  
  1685.        This window size setting scheme meets the goals mentioned in
  1686.        section 3 in the following ways:
  1687.  
  1688.          WLT is dependent upon the number of the connections,
  1689.          thereby administering fairness among connections.  It also
  1690.          considers the level of congestion in the receiving TCP,
  1691.          assuming some measure of resource availability can be pro-
  1692.          vided.
  1693.  
  1694.          The window size will never exceed the bandwidth allocated
  1695.          to the connection.  The algorithm may sometimes give cre-
  1696.          dit to a "well behaving" process by setting his window to
  1697.          greater than the actual buffer available. This window will
  1698.          be reduced if the process does not supply new receive
  1699.          buffers promptly.
  1700.  
  1701.          The current window size is dependent upon previous window
  1702.          sizes and upon the rate at which the process makes letter
  1703.          space available.  If a process fails to make such space
  1704.          available, its receive window will be reduced by OLDWT
  1705.          every time a packet is sent.  (The TCP may also apply a
  1706.          threshold mechanism by which a window is set to zero when
  1707.          it is reduced below the threshold.)
  1708.  
  1709.          The algorithm can be modified slightly to support high
  1710.          throughput for high precedence connections.  Parameter WLT
  1711.          cAn be made dependent on some criterion for the high pri-
  1712.          ority traffic.  Categories of priority can be used with
  1713.          some guaranteed service (part of the bandwidth) given the
  1714.          highest priority categories.
  1715.  
  1716.  
  1717.  
  1718.  
  1719.      Garlick, Rom, & Postel                                      page 28
  1720.  
  1721.                                                LLG 8-Jun-77 13:01  29364
  1722.      Issues in Reliable Host-to-Host Protocols
  1723.  
  1724.  
  1725.  
  1726.      APPENDIX C:  RESYNCHRONIZATION DETAILS
  1727.  
  1728.        In Figure 2, we show the history of sequence numbers used by
  1729.        a particular connection.  The lines labeled "ISN" represent
  1730.        the maximum permitted rate at which sequence numbers can be
  1731.        used, however, this may be different than the maximum
  1732.        throughput rate for the TCP.
  1733.  
  1734.        Suppose that the TCP supporting the connection fails at "C"
  1735.        and must be restarted.  Assume, also, that the sequence num-
  1736.        ber selected to restart is drawn from the value of ISN at
  1737.        the time event "C" occurred.  The shaded area between "C"
  1738.        and "B" represents the maximum expected time that packets
  1739.        emitted at "C" can stay in the net.  Clearly, the ISN line
  1740.        intersects this shaded area, indicating that, after the
  1741.        restart, it is possible that packets emitted at "C" may be-
  1742.        come undistinguishable from those potentially emitted along
  1743.        the ISN curve.  To correct this flaw, the sequence number
  1744.        currently to be used on the connection must be
  1745.        resynchronized before running into the forbidden zone to the
  1746.        left of the ISN line.
  1747.  
  1748.        Testing for the need to resynchronize
  1749.  
  1750.          As packets are produced and sequence numbers assigned to
  1751.          them, the TCP must check for two possible conditions which
  1752.          indicate that resynchronization is needed.  The first is
  1753.          that sequence numbers are being used up so fast that they
  1754.          advance faster than ISN.  The other is that they advance
  1755.          so slowly that ISN "catches up with them."
  1756.  
  1757.          The basic method of selecting an initial sequence number
  1758.          is to delay for an arbitrary period labelled a "clock
  1759.          tick" or STEP and then select the new ISN.
  1760.  
  1761.          In Figure 2, three sequence number histories are traced,
  1762.          ending in points "A", "B", and "C".  In the trace labelled
  1763.          "A," sequence numbers are used at such a rate that point
  1764.          "A" lies beyond ISN plus one STEP.  If the connection were
  1765.          to fail and be restarted at "A," the new ISN would be just
  1766.          below point "A" and would introduce potential unwanted
  1767.          duplicates.
  1768.  
  1769.          This situation can be detected before transmission of the
  1770.          packet.  Let L be the length of the data in octets.  Let
  1771.          SEQ represent the proposed sequence number of the packet,
  1772.          and SEQ+L-1 be the sequence number implicitly associated
  1773.  
  1774.  
  1775.  
  1776.  
  1777.      Garlick, Rom, & Postel                                      page 29
  1778.  
  1779.                                                LLG 8-Jun-77 13:01  29364
  1780.      Issues in Reliable Host-to-Host Protocols
  1781.  
  1782.  
  1783.  
  1784.          with the last octet of packet data.  Also, let SMPL be the
  1785.          sequence numbers consumed at maximum TCP throughput during
  1786.          a maximum packet lifetime.  If ISN+STEP (at the moment
  1787.          that SEQ is to be assigned) lies in the range [SEQ,
  1788.          SEQ+L-1], then the type "A" ISN failure is about to occur.
  1789.          The solution is to send only as much text as is allowed
  1790.          (which does not result in the failure) and WAIT for the
  1791.          clock to tick again.
  1792.  
  1793.          The situation in curve "B" is quite different.  In this
  1794.          case, the connection is using numbers so slowly that the
  1795.          forbidden zone preceding the ISN curve has advanced and
  1796.          run into the connection sequence number curve.  There are
  1797.          two solutions.  One is to wait for the packet lifetime
  1798.          plus one clock step to expire (in which case the sequence
  1799.          history will pop out of the forbidden zone again).  The
  1800.          other is to actively resynchronize the connection.  The
  1801.          test for the type "B" situation is whether sequence number
  1802.          SEQ lies in the range [ISN, ISN+SMPL+STEP].
  1803.  
  1804.          Note that all tests for inclusion must be modulo S, the
  1805.          size of the sequence number space, to account for the wrap
  1806.          around of sequence numbers.
  1807.  
  1808.          Curve "C" in Figure 2 shows a sequence number trace which
  1809.          tends, on the average, to lie within legal values at all
  1810.          times.
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.      Garlick, Rom, & Postel                                      page 30
  1836.  
  1837.                                                LLG 8-Jun-77 13:01  29364
  1838.      Issues in Reliable Host-to-Host Protocols
  1839.  
  1840.  
  1841.  
  1842.          
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.          
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.      Garlick, Rom, & Postel                                      page 31
  1894.  
  1895.                                                LLG 8-Jun-77 13:01  29364
  1896.      Issues in Reliable Host-to-Host Protocols
  1897.  
  1898.  
  1899.  
  1900.      As presented at the Second Berkeley Workshop on Distributed
  1901.      Data Management and Computer Networks, May 1977, at Berkeley,
  1902.      California.####;
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.      Garlick, Rom, & Postel                                       page 0
  1952.